Channel program translation

ABSTRACT

A CCW (CHANNEL COMMAND WORD) STRING IN VIRTUAL MEMORY IS MOVED TO REAL STORAGE ADDRESSES, AND THE DATA ADDRESSES IN THE CCW STRING ARE REPALCED WITH CORRESPONDING REAL ADDRESSES. THE I/O SUPERVISOR (IOS) CHECKS ALL INPUT RECEIVED (BLOCK 10) AND BUILDS A CONTROL BLOCK CALLED A REQUEST QUENE ELEMENT (RQE). IF NEEDED, IOS FIXES THE PAGES CONTAINED IN THE CONTROL BLOCKS PASSED TO IT (BLOCK12). IF A DEVICE IS FREE (BLOCK 14), A START I/O INSTRUCTION IS ISSUED (BLOCK 16). CCW TRANSLATION 18 IS NECESSARY TO INSURE THAT THE CHANNEL PROGRAM CONTAINS ONLY REAL ADDRESSES. A TABLE OF LIMIT ADDRESSES IS CONSTRUCTED IN A WORK AREA AND CONTAINS THE ADDRESS OF THE FIRST VIRTUAL CCW IN A STRING AND THE ADDRESS OF THE CURRENT CCW UNDERGOING TRANSLATION. TRANSFER-IN-CHANNEL COMMANDS (TIC&#39;&#39;S) (COMMANDS WHICH BRANCH TO ANOTHER PART OF THE CHANNEL PROGRAM) HAVE THEIR TRANSFER-TO ADDRESSES COMPARED WITH THE LIMIT ADDRESSES STORED IN THE TABLE. IF THE TRANSFER-TO ADDRESS FALLS WITHIN THE LIMITS, THE TIC IS IMMEDIATELY RESOLVED TO ITS REAL COUNTERPART. IF THE ADDRESS FALLS OUTSIDE THE LIMITS, THE TIC IS PUT ON AN UNRESOLVED TIC LIST TO BE RESOLVED AFTER THE ENTIRE CCW STRING HAS BEEN TRANSLATED. IF THE CCW STRING CROSSES PAGE BOUNDARIES, AN INDIRECT ADDRESS LIST IS CONSTRUCTED FOR THE CCW. THE INDIRECT ADDRESS LIST PROVIDES A SERIES OF BEGINNING ADDRESSES FOR A DISCONTINUOUS STRING OF DATA STORAGE. THE LIST IS REFERENCED BY AN INDIRECT ADDRESS STORED IN THE TRANSLATED CCW. A FLAG IS TURNED ON IN THE CCW TO INDICATE TO THE CHANNEL PROGRAM THAT THE DIRECT ADDRESS LIST IS TO BE REFERENCED. IF A DEVICE OR CHANNEL IS BUSY OR UNAVAILABLE, THE I/O SUPERVISOR PLACE THE RQE INTO A QUENE (BLOCK 20). IF CCW TRANSLATION WAS PERFORMED DURING THE START I/O OPERATION, THE CHANNEL STATUS WORD (CSW) IS TRANSLATED (BLOCK 24) SO THAT IT CONTAINS THE CORRECT VIRTUAL ADDRESS. ANY PAGES SPECIFICALLY FIXED FOR THIS I/O OPERATION ARE NOW UNFIXED. STATUS INDICATORS ARE CHECKED (BLOCK 22). IF THE I/O ACTIVITY WAS NOT COMPLETED SUCCESSFULLY, THE SUPERVISOR INVOKES AN ERROR ROUTING (BLOCK 32) WHICH MAY ATTEMPT THE ACTIVITY AGAIN. IF THE I/O ACTIVITY WAS COMPLETED SUCCESSFULLY, PREVIOUSLY SCHEDULED I/O OPERATIONS QUEUE (BLOCK 26). THE QUEUE AN RQE FROM THE REQUEST QUEUE (BLOCK 26). THE QUEUE IS CHECKED REPEATEDLY (PATH 19) UNTOL NO SCHEDULED REQUESTS REMAIN. A START I/O IS ISSUED FOR EACH REQUEST (BLOCK 28) AND CCW&#39;&#39;S NOT ALREADY TRANSLATED ARE TRANSLATED (BLOCK 30). IF AN ERROR ROUTING 32 IS INVOKED, RETURN FROM THE ROUTINE ENTERS THE I/O SUPERVISOR VIA SVC15. THE OPERATION IS RETIRED AS ILLUSTRATED BY BLOCKS 34, 36, 38 AND 40.

abstracts of Defensive Publication applifl The heading of each abstract indie s the nut: in the application as originally filed files of may be purchased for 30 cents a shoot.

Defensive Publication applications have not been exarrf';

in-se with the No cc of Dec. 16, 1869, 869 0.6. 687'. The o erly numbered series a..d a 'earrunged chronologically. non, ding il and s .eets of drawings contained 2 to the uublic for inspection and reproduction to toe merits of alleged invention. The Patent and Trademark Ofiice makes no assertion as to the novelty of the disclosed subject matter.

PUBLISH D NOVEM ER 4, 1975 PRIQR ART (I10 SUPER-NECK) CHANGES VALl E lilFUl' lLD iroursr curur [may iflnE) F m PlACE REQUEST ELEilElll INTO REQUEST OlJEiJE TRANSLME CDW'S IF REQUEST Hill I ALREADY INPJISLMED svc (5 28 VALluAIEltPUT \34 I HUWSLME BCl'l'S is I ISSUE START {/0 PLACE REC'UIST l'LEiitlil mm mum ourur A CCW (channel command word) string in virtual dcnlory is to real storage addresses, and the data.

- e in the CCW string are replaced with corresponding real addresses.

Th 1/0 supervisor (56S) checks all input received (bio-cl; iii) and builds a control block called a request queue element (RQE. If needed, 105 fixes the pages contained in the control bloccs passed to it (block 12). if a device is free (block 14), a start l/O instruction is issued (block 15). CCW translation i8 is necessary to insure that the channel program contains only real addresses.

A table of limit addresses is constructed in a work area contains the address of the first virtual COW in a string the address of the current CCW undergoing trans tion. 'lransfcr-in-channel commands (TICs) (commands which branch to another part of the channel program) have their transfer-to addresses compared with the limit addresses stored in the table. If the transfer-to address falls the limits, the TIC is immediately resolved to its real counterpart. If the address falls outside the limits, the TIC is put on an unresolved TlC list to be resolved aftr the entire CCW string has been translatcd.

If the CC?! string crosses page boundaries, an indirect address list is constructed for the CCW. The indirect ad dress list provides a series of bc inning addresses for a discontinuous string of data storage. The list is referenced by an indirect address stored in the translated CCW. A flag is turned on in the CCW to indicate to the channel program that the indirect address list is to be referenced.

ii a device or channel is busy or unavailable, the I/O supervisor places the RQE into a queue (block 2%).

If CCW translation was performed during the start l/O operation, the channel status Word (CSW) is translated (blocl: 2d) so that it contains the correct virtual address. Any pages specifically fixed for this 1/0 operation are now unfiz'ed. Status indicators are checked (block 22). if the 1/0 activity was not completed successfully, the supervisor invokes an error routine (block 32) which may attempt the activity again.

if the I/O activity Was completed successfully, previously scheduled l/O operations are started by selecting an RQE from the request queue (block 26). The queue is checked repeatedly (path 1%) until no scheduled requests remain. A start 1/0 is issued for each request (block 2%) and CCWs not already translated are translated (block 3d).

If an error routine 32 is invoked, return from the routine enters the 1/0 supervisor via SVCli. The operation is retired as illustrated by blocks 34, 3d, 38 and 80.

Nov. 4, 1975 L. E. LARSON T940,0l9

CHANNEL PROGRAM TRANSLATION Original Filed March 26, 1974 Sheet 1 of 23 PRIOR ART (I/O SUPERVISOR) F I 4 CHANGES VALIDATE INPUT BUILD REQUEST QUEUE FIX PAGES ELEMENT (ROE) \40 l2 ISSUE START I /0 TRANSLATE CCW'S DEVICE BUSY 48 PLACE REQUEST ELEMENT INTO REQUEST QUEUE I/O INTERRUPTION CHECK STATUS INDICATORS TRANSLATE 08w S & UNFIX PAGES ERRoR V ROUTINE 3V0 SELECT REQUEST ELEMENT 15 FROM REQUEST QUEUE 49 TRANSLATE cow's ISSUE START I/O 1 IF REQUEST NOT ALREADY TRANSLATED svc45 Y VALIDATE INPUT ISSUE START I/O 4 TRANSLATE cow's R \36 INVENTOR PLACE REQUEST ELEMENT LAWRENCE LARSON INTO REQUEST QUEUE BY dwha M ATTORNEY Nov. 4, 1975 L. E. LARSON T940,019

CHANNEL PROGRAM TRANSLATION Original Filed March 26, 1974 Sheet 2 of 23 EXCP SUPERVISOR VIA SUPERVISOR'S SVC FIRST LEVEL INTERRUPTION HANDLER SCHEDULE ABEND ROUTINE BUILD A REQUEST ELEMENT I FIX APPENDAGES A CONTROL BLOCKS INITIALIZE TRANSLATE TABLES \54 DEVICE FREE OUEUE THE REQUEST ELEMENT 59 START I/O APPENDAGE FIG.2e

TRANSLATE CCW'S -\62 FIG FIG I 20. 2b ISSUE START I/O INSTRUCTION FIG.

FIG.

I EXIT I Nov. 4, 1975 L. E. LARSON T940,019

CHANNEL PROGRAM TRANSLATION Original Filed March 26, 1974 Sheet 3 of 23 FlG.2b

I/O INTERRUPTION SUPERVISOR TRANSLATE CSW T0 APPROPRIATE CHECK HANDLER CONTROLLED INTERRUPTION APPENDAGE UCB,MARK mTERcEPT (PCI) 94 87 YES TRANSLATE 7 FREE THE ccw's UCB PCI RETURN L vEcToR TABLE CHANNEL YES FREE THE END DEVICE Nov. 4, 1975 L. E. LARSON T940,019

CHANNEL PROGRAM TRANSLATION Qriginal Filed March 26, 1974 Sheet 4 of 23 FIG. 2 c

DEVICE FREE THE END DEVICE J REINITIALIZE TRANSLATE TABLES Y I CHANNEL REQUESTOR'S OBTAIN AND ABNORMAL END ATTENTION EXAMINE SENSE END IAPPENDAGE ROUTINE INFORMATION APPENDAGE Sheet 5 Of 23 NOV. 4, 1975 L. E. LARSON CHANNEL PROGRAM TRANSLATION Original Filed March 26, 1974 YES ERROR EXCP SUPERVISOR I POST REQUESTOR'S 1/0 ERRoR I46 ECB ROUTINE Z SCHEDULE ABEND uNEl x FREE ROUTINE ROUTINE I20 /I48 PLACE RE N EsTOR s \122 EN E QSE'S INTO FREELIsT QUEUE MAKE CPU I50 INTERRUPTIBLE FOR I/O OPERATIONS ABNORMAL END 424 r APPENDAGE PREVENT FURTHER I/O IN ERRNPno s 42 CHANNEL END FROM APPENDAGE 444 START OTHER DEVICES ON THIS CHANNEL IF POSSIBLE PENDING I/O INTERRUPTIONS WILL OCCUR AT THIS POINT NIEIIN IIBLE PREVENT FURTHER FOR I/O 1/0 OPERATIONS INTERRUPTIONS TO I /0 FIRST LEvEL INTERRUPTION I HANDLER PENDING I/O T0 SUPERVISOR'S TYPE INTERRUPTIONS I EXIT ROUTINE WILL OCCUR AT THIS POINT NOV. 4, 1975 L. E. LARSON CHANNEL PROGRAM TRANSLATION Sheet 6 of 23 Original Filed March 26, 1974 202m SE28 2: 3022522 355 fi m u E: 25m $2 :5 ii j /|l\ SEE: mm 3 a: Z: 552 :5 2E 50% 322 3: 53 XI m5: 53mg: 353 52%: 32:51 as: 22250 5m AH. Om E25: 210mm: ovo 252 2:2 2:2 2: 32m 59;: :52 222355 50 22:2 25 /I\\/\ saw. ass E a E53 2352 a; a; 3:2 l 52: v 52: 2% En 2; ME a; 52am 52m: $22 :22 2; 2E 50 as 5m 35 g a: 322: g :2 GE a :0; Q5 55: M53 52% 2:55 55 $2225: 248% 0325: E;

Nov. 4

FIG.5

L. E. LARSON CHANNEL PROGRAM TRANSLATION Original Filed March 26, 1974 I ENTRY I Sheet 8 of 23 BUILD REQUEST ELEMENT ROUTINE INITIALIZE UPDATE FREE LIST AND NEXT AVAILABLE /220 CHANGE REQUESTOR'S PSW SO THAT SVCOVIILL BE EXECUTED AGAIN I I EXIT I I0 SUPERVISORS TYPE I EXIT ROUTINE PAGING SUPERVISORS TCB IN CTR SUPERVISOR REQUEST SET USER MODE FLAG IN RQE T0 "PAGING SUPERVISOR" N Mo 4, 1975 Original Filed March 26, 1974 w FIG.6

L. E. LARSON CHANNEL PROGRAM TRANSLATION Sheet 9 of 23 BUILD A REQUEST ELEMENT ROUTINE IS CURRENT TASK'S RB AN SURB YES

SET USER ARE BLOCK AND THE ENTRIES APPENDAGE W E E Q VALID PAGE FIX V R ROUTINE 248 I sEIIvIoE I E INTERFACE R A ROUTINE B 3 (FOR PAGE FIX E L E I 250 INCREMENT T0 EXCP VALIDITY CO U I T E R T0 CHK ROUTINE REFERENCE TO (BLOCK 5I FIG.2 DATA SET Nov. 4, 1975 L. E. LARSON T940,019

CHANNEL PROGRAM TRANSLATION Original Filed March 26, 1974 Sheet 10 of 23 BUILD A REQUEST ELEMENT ROUTINE CALCULATE AND SAVE ADDRESS OF LOGICAL CHANNEL MD \250 FROM TEST CHANNEL (FIG.8) OR 810 FOR DAsD 252 is THE REQUEST ENTRY RELATED TO ANOTHER PLACE REDuEsTOR's ROE IN ODEDE s THE REMOVE I REOuEsT TO BE INTERCEPTED FROM POsT sTO QUEUE ROUTINE 2 2 II II EXIT I EXIT I TO SUPERVISOR'S TO TEsT CHANNEL TO ABNORMAL TYPE I EXIT ROUTINE I F|G.8 END APPENDAGE ROUTINE Nov. 4, 1975 Original Filed March 26, 1974 L. E. LARSON CHANNEL PROGRAM TRANSLATION GET ADDRESS OF SIO ROUTINE ADDRESS FROII ALTERNATE PATH TABLE Sheet 11 of 23 SELECTOR CHANNEL ALTERNATE PATHS TEST CHANNEL ROU FROM OET REOUEST ELEIIENT ROUTINE EICJI ENTRY NULTIPLEXOR SELECTOR CHANNEL CHANNEL N0 ALTERNATE PATHS I REPOSITION GET CHANNEL GET CHANNEL ENTR|E3 IN ADDRESS ADDRESS ALTERNATE I PATH TABLE GET CHANNEL ISSUE TCH INSTRUCTION TO GET REQUEST ELEMENT ROUTINE (FIG?) OR CHANNEL RESTART 'I EXIT I TO GET REQUEST ELEMENT ROUTINE (FIG?) Nov. 4, 1975 Original Filed March 26, 1974 L. E. LARSON CHANNEL PROGRAM TRANSLATION T GET MAIN S E FOR INITIAL M A TRANSLATE B M TABLES E ROUND START AND END ADDRS AND SET PTR TO NEXT ENTRY RETURN CODE CLEAR TABLE AREA AND INITIALIZE HEADER RECORD ABTERM EXIT SEE IF PAGES 542 54 4 DEB LENGTH BDLS OS FIG.I I

CHECK TO SEE IF PAGES T94IO,019

Sheet 12 of 23 CONTROL BLOCKS ATE TABLES ARE FIXED 504 I 5oe SET ECB POINTER BLDLST95 FIG.II

CHECK TO SEE IF PAGES ARE FIXED SET DCB POINTER I I BLDLST95 FIRII CHECK T0 ARE FIXED CALCULATE AND SET POINTERS sET DEB" POINTERS BLDLST95 FIG.II

CHECK TO SEE IF PAGES ARE FIXED AVT FIX NEEDED SET AVT POINTER BLDLST95 FIG. II

CHECK TO SEE IF PAGES ARE FIXED SET 330 YES LENGTH LENGTH To 2K SET PoINTER 552 TO NEXT APPENDAGE I BLDLST95 FIG.II SECEHEITK PTAOGES 554/ ARE FIXED FIND IST ENTRY IN AVT APPENDAGE /326 TINNTLNDEEE 558 FIX ENTRY Nov. 4, 1975 L. E. LARSON CHANNEL PROGRAM TRANSLATION Original Filed March 26, 1974 FIGJO Sheet 13 of 23 FIX APPENDAGES 8 CONTROL BLOCKS INITIALIZE TRANSLATE TABLES MARK END OF FIX LIST FIX PAGES FOR CNTRL BLOCKS &

APPENDAGE RETURN OTHER RETURN TO CALLER I BLDLST95 I FIND CVT SET POINTER TO FIX LIST SET POINTER T0 NEXT FIX LIST CREATE A NEW ,ENTRY & SET

FIG.II

ssz

RECOVER T0 NEXT ADDR I I RETURN Nov. 4, 1975 LE. LARSON T940,019

CHANNEL PROGRAM TRANSLATIQN Original Filed March 26, 1974 Sheet 14 of 23 FROM TEsT CHANNEL ROUHNE (F|(; 8) START I/O ROUTINE FOR UNIT RECORD, TELEPROCESS ING a ENTRY GRAPHICS REQUEST FOR IMMEDIATE OPERATION ENTRY FOR TP DEVICES 586 MOVE REAL RRERORT I/O REQUEST RESTART cow INTO WK REG.I sas MOVE VIRTUAL MOVE REAL ADDRESS OF ADDRESS OF REQUESTOR'S REQUESTOR'S 374 RESTART ccw START ccw '\390 INTO WK REG.I INTO WK REG.I

MOVE VIRTUAL ADDRESS OF REQUESTOR'S 37 START COW INTO WK REOI XCPSIOIFIOBI I EXIT I TO POST START I/O ROUTINE T94O,Ol9

Sheet 15 of 23 NOV. 4, 1975 L. E. LARSON CHANNEL PROGRAM TRANSLATION Original Filed March 26, 1974 SET UP STAND ALONE Ocw AND ADDRESS IN INDICATE N0 ENTRY REG 14 TRANSMISSION 18 "P310 To BE DONE ADDRESS IN FROM $10 ROOMMFs FOR START I/O SUBROUTINE IMMEDIATE COMMANDS FIG. 13 OR ERPS 4M REG 14+8 FROM START I/O COW MODIFY MOVE ADDR 0F ROUTINE H612 REMOVE cow FROM VIRTUAL REQUESTOR'S WKREG1 INTO \594 REQUEST ROE FROM cm A OUEUE SAVE STATUS 4 8 INDICATING ccw MODIFY EXIT FOR TRANSLATE ROUTINE TO I/O INTERRUPTION SUPERVISOR RESET ERROR FLAGS TRANSLATION YES COMPLETE 432 N0 442 PUT START SIO ADDRESS m APPENDAGE TRANSLATE TABLE MOVE START 0R i s iv F AARDEDAR AND PUT SAVE 428 AREA ADDR IN TRANSLATE TABLE Nov. 4, 1975 L. E. LARSON T940,019

CHANNEL PROGRAM TRANSLATION Original Filed March 26, 1974 Sheet 16 of 23 FIG. 14

START I/O SUBROUTINE /452 MOVE I LC, 00 AND PROGRAM MASK FIELDS 0F Psw T0 [OB NO 458 454 I; I

MOVE REOUESTOR'S TRACING PROTECT KEY FROM ROE T0 OAW ROUT'NE I PLACE ADDRESS or UCB mm UCB SAVE AREA 456 MOVE TRANSLATE PLACE ADDRESS OF ADDR INTO CAW CURRENT PATH OR PREFIX TIC INTO UCB 458 PLACE ADDRESS OF ROE INTO UCB RETURN FIG 12 TCCWIOOO FIG15 TRANSLATE CCW'S EXECUTE S10 INSTRUCTION Nov. 4, 1975 L. E. LARSON CHANNEL PROGRAM TRANSLATION Original Filed March 26, 1974 FIG. I5 TRANSLATE cow's FIGII8 F|G.I6 I GNTRY 4e2 YES Sheet 17 of 23 INITIALIZE TRANSLATE FHUDZCD TCCWS300(FIC.24)

PROCESS RETURN CODE SET TCCW LIST LOOP COUNT TO PROCESS IST. STRING MOVE REAL CCW TO REAL STRING IFIGISI E Nov. 4, 1975 L. E. LARSON T940,019

CHANNEL PROGRAM TRANSLATION On'ginal Filed March 26, 1974 Sheet 18 of 23 FIG. 46 TRANSLATE ccw's I 504 I GETMAIN 8 E FOR g COW M IALS E MODIFY 4ss 506 gggg' 24) I GETMAIN s RETURN E DO l B LE CODE 50? M SIZE E 490 TGCWS300 (FIG.24)

cow N0 MOVE STRlNG MODFY TO NEW AREA YES 508 492 CALCULATE N0 00w 7 DISPLA&GEMENTS STRIN ENTRYG RECALCULATE 50 ms E YEs 4 540 494 FREE SQA T LOOP STRING N0 To TAKEN BY OLD QE PROCESS ccw usr IF NEW STRING NOT TSEEFIRST YES N k 4 new 542 ALL MODIFY LIST ENTRIES YES PROCESSED FIG.48 N0 G 498 PCI ENOUGH MODIFY YES SPACE LIST 500 W CALCULATE SIZE OF IAL NEEDED Nov. 4, 1975 L. E. LARSON T940,()19

CHANNEL PROGRAM TRANSLATION Original Filed March 26, 1974 Sheet 19 of 23 F I G. 1 7

TRANSLATE CCW'S LOCATE PAGE TO BEFIXED \556 SETCOMP ADDRS IN TCCW LIST T0 IND PAGE IS FIXED TCCWSZOO (F1619) UPDATTIE) ggggm FIX LIST \550 I FIX I E cow R A PAGE B s E TCCWS300 (F|G.24)

PROCESS RETURN CODE \554 

